package com.netty.shcheduler;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Timer;
import java.util.TimerTask;

/**
 * @author xl-9527
 * @since 2024/6/11
 **/
public class TimerTest extends TimerTask {

    private static final Logger log = LoggerFactory.getLogger(TimerTest.class);

    public static void main(String[] args) {
        final Timer timer = new Timer();
        timer.schedule(new TimerTest(), 4000, 1000);
    }

    @Override
    public void run() {
        log.info("我是延时任务");
    }
}
